﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Entidades
{
    public class ServerNode
    {        
        
        public string Nombre { get; set; }
        public int Identificador { get; set; }
        public string URL { get; set; }
        public bool Activo { get; set; }
        
        public ServerNode(string nombre)
        {
            this.Nombre = nombre;
            this.Activo = true;
        }
        public ServerNode()
        {            
        }
        public override bool Equals(object obj)
        {
            if (obj == null)
                return false;
            else
            {
                ServerNode nodo = (ServerNode) obj;
                return (nodo.URL == this.URL);
            }
        }
        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override string ToString()
        {
            return this.Nombre + " " + this.URL;
        }
    }
}
